home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Assassins - Ultimate CD Games Collection 1
/
Assassins - Ultimate CD Games Collection (1994)(Weird Science)(Track 1 of 2)[!][Amiga-CD32-CDTV][CDD5332].iso
/
arcade
/
matrixblaster
/
matrixblastersrc.amos
/
matrixblastersrc.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1978-01-04
|
20KB
|
717 lines
Rem - v1 of matrix blaster - 25 Dec 93
' --MAIN--
Rem repeat until end of game
Dim SCORE(6),LEVEL(6),PLIFE(6),LAMER(6) : Rem amos would not allow array to be
' dimensioned in subroutine, when called in MAIN loop
' rem load banks
Load "sounds",5
Load "sounds2",11
Load "pic1",9
Load "pic2",10
Load "pic3",15
Gosub PICSEQ
Gosub TITLESEQ
Gosub VARDEF
Gosub VARINIT
Gosub OLDHISCORE
Gosub INITSCREEN
Rem repeat until player dies
DLAY=0
Rem fire button accelerates bike
Do
Do
If LAMER(CURRENTPLAYER)=True
Wait 1
End If
Rem On Break Proc CLEANUP
If Fire(1)
THICK=2
Else
THICK=1
End If
If Not(BIKEALIVE)
Exit
End If
MOVEBIKE
BIKECHECK
If E1LIVE=0
ENEMX=ENEM1X : ENEMY=ENEM1Y : ENEMDIR=ENEM1DIR : ENEMLIVE=E1LIVE
MOVEENEM
ENEM1X=ENEMX : ENEM1Y=ENEMY : ENEM1DIR=ENEMDIR : E1LIVE=ENEMLIVE
If Not(BIKEALIVE)
Exit
End If
MOVEBIKE
BIKECHECK
End If
If E2LIVE=0 and LEVEL(CURRENTPLAYER)>1
ENEMX=ENEM2X : ENEMY=ENEM2Y : ENEMDIR=ENEM2DIR : ENEMLIVE=E2LIVE
MOVEENEM
ENEM2X=ENEMX : ENEM2Y=ENEMY : ENEM2DIR=ENEMDIR : E2LIVE=ENEMLIVE
If Not(BIKEALIVE)
Exit
End If
MOVEBIKE
BIKECHECK
End If
If E3LIVE=0 and LEVEL(CURRENTPLAYER)>2
ENEMX=ENEM3X : ENEMY=ENEM3Y : ENEMDIR=ENEM3DIR : ENEMLIVE=E3LIVE
MOVEENEM
ENEM3X=ENEMX : ENEM3Y=ENEMY : ENEM3DIR=ENEMDIR : E3LIVE=ENEMLIVE
If Not(BIKEALIVE)
Exit
End If
End If
If LEVEL(CURRENTPLAYER)=1 and E1LIVE=1
LEVEL(CURRENTPLAYER)=2
Gosub BONUS
Exit : Rem from combat loop
End If
If LEVEL(CURRENTPLAYER)=2 and E1LIVE=1 and E2LIVE=1
LEVEL(CURRENTPLAYER)=3
Gosub BONUS
Exit : Rem from combat loop
End If
If LEVEL(CURRENTPLAYER)>2 and E1LIVE=1 and E2LIVE=1 and E3LIVE=1
LEVEL(CURRENTPLAYER)=LEVEL(CURRENTPLAYER)+1
Gosub BONUS
Exit : Rem from combat loop
End If
If BIKEALIVE=False
Exit : Rem exit from combat loop
End If
If DLAY>=18
DLAY=0
End If
Loop
If BIKEALIVE=False and PLIFE(CURRENTPLAYER)=0 : Rem one guy loses all lives
If CURRENTPLAYER=2
If PLIFE(6)=0 : Rem other player's lives gone too
Rem - this works for one player mode as well
' because in 1 player mode, plaler 2 lives are set to 0
Gosub AGAINPLAY : Rem ask for another game
Gosub TITLESEQ
Gosub VARDEF
Else If PLIFE(6)>0 : Rem other player still alive
CURRENTPLAYER=6 : Rem switch to other player
End If
Else : Rem player is #6, not #2
If PLIFE(2)=0 : Rem other player's lives gone too
Gosub AGAINPLAY : Rem ask for another game
Else If PLIFE(2)>0 : Rem other player still alive
CURRENTPLAYER=2 : Rem switch to other player
End If
End If
Else If BIKEALIVE=False and PLIFE(CURRENTPLAYER)>0 : Rem still has some lives
If TWOMODE=True : Rem if two playing, switch to other
If CURRENTPLAYER=2
CURRENTPLAYER=6
Else If CURRENTPLAYER=6
CURRENTPLAYER=2
End If
Else If TWOMODE=False : Rem only one player mode
Rem no op
End If
End If
' am assuming exit from combat=death of player or next level of play
Gosub VARINIT
Gosub INITSCREEN
Loop
' --END--
End
Procedure MOVEBIKE
If Jright(1) and BIKECHANGE=False
Add BIKEX,THICK
If BIKEDIR<>MRIGHT
BIKECHANGE=True
End If
Rem this is here for people who keep
' pressing the joystick in one direction. if this was not
' here, the program would read *ANY* input as a change of
' direction, and would slow the line down
BIKEDIR=MRIGHT
Else If Jleft(1) and BIKECHANGE=False
Add BIKEX,-THICK
If BIKEDIR<>MLEFT
BIKECHANGE=True
End If
BIKEDIR=MLEFT
Else If Jup(1) and BIKECHANGE=False
Add BIKEY,-THICK
If BIKEDIR<>MUP
BIKECHANGE=True
End If
BIKEDIR=MUP
Else If Jdown(1) and BIKECHANGE=False
Add BIKEY,THICK
If BIKEDIR<>MDOWN
BIKECHANGE=True
End If
BIKEDIR=MDOWN
Else If(Joy(1)<>1 and Joy(1)<>2 and Joy(1)<>4 and Joy(1)<>8)
If BIKEDIR=MDOWN
Add BIKEY,THICK
Else If BIKEDIR=MUP
Add BIKEY,-THICK
Else If BIKEDIR=MRIGHT
Add BIKEX,THICK
Else If BIKEDIR=MLEFT
Add BIKEX,-THICK
End If
End If
If BIKECHANGE=True : Rem change of direction occurred
BIKEWAIT=BIKEWAIT+1
SCUPDATE=True
Rem following block: keep moving bike in same direction
If BIKEDIR=MDOWN
Add BIKEY,THICK
Else If BIKEDIR=MUP
Add BIKEY,-THICK
Else If BIKEDIR=MRIGHT
Add BIKEX,THICK
Else If BIKEDIR=MLEFT
Add BIKEX,-THICK
End If
End If
If BIKEWAIT>5 : Rem bike must move in same direction for 5 "steps"
BIKECHANGE=False : Rem before being allowed to change direction
BIKEWAIT=1 : Rem reset variables
End If
End Proc
Procedure BIKECHECK
If BIKEDIR=MUP
CP=Point(BIKEX,BIKEY-4)
If CP<>BKCOLOR
DESTRUCT[BIKEX-4,BIKEY-4] : YOUDIE
End If
Else If BIKEDIR=MRIGHT
CP=Point(BIKEX+4,BIKEY)
If CP<>BKCOLOR
DESTRUCT[BIKEX-4,BIKEY-4] : YOUDIE
End If
Else If BIKEDIR=MDOWN
CP=Point(BIKEX,BIKEY+4)
If CP<>BKCOLOR
DESTRUCT[BIKEX-4,BIKEY-4] : YOUDIE
End If
Else If BIKEDIR=MLEFT
CP=Point(BIKEX-4,BIKEY)
If CP<>BKCOLOR
DESTRUCT[BIKEX-4,BIKEY-4] : YOUDIE
End If
End If
Ink BIKETRAIL
Bar BIKEX-2,BIKEY-2 To BIKEX+2,BIKEY+2
If SCUPDATE=True
If CURRENTPLAYER=2
Locate 62,10 : Print "SCORE: ";SCORE(CURRENTPLAYER)
Else
Locate 62,16 : Print "SCORE: ";SCORE(CURRENTPLAYER)
End If
Locate 62,24 : Print "HIGH: ";HISCORE
SCUPDATE=False
End If
End Proc
Procedure MOVEENEM
Shared ENEMX,ENEMY,ENEMDIR,ENEMLIVE
LEFTEDGE=0 : RIGHTEDGE=0 : LEFTTOP=0 : RIGHTTOP=0
PATHFOR=True : PATHLEF=True : PATHRIGHT=True
If ENEMDIR=MDOWN
For COUNT=4 To 8 Step 2
Rem check ahead
LEFTEDGE=ENEMX+2 : RIGHTEDGE=ENEMX-2
CP=Point(LEFTEDGE,ENEMY+COUNT)
If CP<>BKCOLOR
PATHFOR=False
End If
CP=Point(RIGHTEDGE,ENEMY+COUNT)
If CP<>BKCOLOR
PATHFOR=False
End If
Rem check right
CP=Point(RIGHTEDGE-COUNT,ENEMY)
If CP<>BKCOLOR
PATHRIGHT=False
End If
RIGHTTOP=ENEMY-4
CP=Point(RIGHTEDGE-COUNT,RIGHTTOP)
If CP<>BKCOLOR
PATHRIGHT=False
End If
Rem check left
LEFTTOP=ENEMY-4
CP=Point(LEFTEDGE+COUNT,ENEMY)
If CP<>BKCOLOR
PATHLEF=False
End If
CP=Point(LEFTEDGE+COUNT,LEFTTOP)
If CP<>BKCOLOR
PATHLEF=False
End If
Rem where can enemy go?
If PATHFOR=False and PATHLEF=False and PATHRIGHT=False
Proc DIE[ENEMX,ENEMY] : ENEMLIVE=1 : Pop Proc
Else If PATHFOR=True and PATHLEF=True and PATHRIGHT=True
ENEMDIR=MDOWN : Rem go down
Else If PATHLEF=False and PATHRIGHT=False
ENEMDIR=MDOWN : Rem go Down
Else If PATHLEF=False and PATHFOR=False
ENEMDIR=MLEFT : Rem turn left
Else If PATHFOR=False and PATHRIGHT=False
ENEMDIR=MRIGHT : Rem turn right
Else If PATHFOR=False
If BIKEX<ENEMX
ENEMDIR=MLEFT : Rem turn left
Else
ENEMDIR=MRIGHT : Rem turn right
End If
End If
Next COUNT
Ink ENEMYTRAIL : Bar ENEMX-2,ENEMY-2 To ENEMX+2,ENEMY+2
If ENEMDIR=MLEFT
ENEMX=ENEMX-2
End If
If ENEMDIR=MRIGHT
ENEMX=ENEMX+2
End If
If ENEMDIR=MDOWN
ENEMY=ENEMY+2
End If
CHECKED=True
Else If ENEMDIR=MUP : Rem up
For COUNT=4 To 8 Step 2
Rem check ahead
LEFTEDGE=ENEMX-2 : RIGHTEDGE=ENEMX+2 : LEFTTOP=ENEMY+4 : RIGHTTOP=ENEMY+4
CP=Point(LEFTEDGE,ENEMY-COUNT)
If CP<>BKCOLOR
PATHFOR=False
End If
CP=Point(RIGHTEDGE,ENEMY-COUNT)
If CP<>BKCOLOR
PATHFOR=False
End If
Rem check right
CP=Point(RIGHTEDGE+COUNT,ENEMY)
If CP<>BKCOLOR
PATHRIGHT=False
End If
CP=Point(RIGHTEDGE+COUNT,RIGHTTOP)
If CP<>BKCOLOR
PATHRIGHT=False
End If
Rem check left
CP=Point(LEFTEDGE-COUNT,ENEMY)
If CP<>BKCOLOR
PATHLEF=False
End If
CP=Point(LEFTEDGE-COUNT,LEFTTOP)
If CP<>BKCOLOR
PATHLEF=False
End If
Rem where can enemy go?
If PATHFOR=False and PATHLEF=False and PATHRIGHT=False
Proc DIE[ENEMX,ENEMY] : ENEMLIVE=1 : Pop Proc
Else If PATHFOR=True and PATHLEF=True and PATHRIGHT=True
ENEMDIR=MUP : Rem go up
Else If PATHLEF=False and PATHRIGHT=False
ENEMDIR=MUP : Rem go up
Else If PATHLEF=False and PATHFOR=False
ENEMDIR=MRIGHT : Rem turn right
Else If PATHFOR=False and PATHRIGHT=False
ENEMDIR=MLEFT : Rem turn left
Else If PATHFOR=False
If BIKEX<ENEMX
ENEMDIR=MLEFT : Rem turn left
Else
ENEMDIR=MRIGHT : Rem turn right
End If
End If
Next COUNT
Ink ENEMYTRAIL : Bar ENEMX-2,ENEMY-2 To ENEMX+2,ENEMY+2
If ENEMDIR=MLEFT
ENEMX=ENEMX-2
End If
If ENEMDIR=MRIGHT
ENEMX=ENEMX+2
End If
If ENEMDIR=MUP
ENEMY=ENEMY-2
End If
Else If ENEMDIR=MLEFT : Rem left
For COUNT=4 To 8 Step 2
Rem check ahead
LEFTEDGE=ENEMY+2 : RIGHTEDGE=ENEMY-2 : LEFTTOP=ENEMX+4 : RIGHTTOP=ENEMX+4
CP=Point(ENEMX-COUNT,LEFTEDGE)
If CP<>BKCOLOR
PATHFOR=False
End If
CP=Point(ENEMX-COUNT,RIGHTEDGE)
If CP<>BKCOLOR
PATHFOR=False
End If
Rem check right
CP=Point(ENEMX,RIGHTEDGE-COUNT)
If CP<>BKCOLOR
PATHRIGHT=False
End If
CP=Point(RIGHTTOP,RIGHTEDGE-COUNT)
If CP<>BKCOLOR
PATHRIGHT=False
End If
Rem check left
CP=Point(ENEMX,LEFTEDGE+COUNT)
If CP<>BKCOLOR
PATHLEF=False
End If
CP=Point(LEFTTOP,LEFTEDGE+COUNT)
If CP<>BKCOLOR
PATHLEF=False
End If
Rem where can enemy go?
If PATHFOR=False and PATHLEF=False and PATHRIGHT=False
Proc DIE[ENEMX,ENEMY] : ENEMLIVE=1 : Pop Proc
Else If PATHFOR=True and PATHLEF=True and PATHRIGHT=True
ENEMDIR=MLEFT : Rem go left
Else If PATHLEF=False and PATHRIGHT=False
ENEMDIR=MLEFT : Rem go left
Else If PATHLEF=False and PATHFOR=False
ENEMDIR=MUP : Rem turn up
Else If PATHFOR=False and PATHRIGHT=False
ENEMDIR=MDOWN : Rem turn down
Else If PATHFOR=False
If BIKEY<ENEMY
ENEMDIR=MUP : Rem if bike is above, turn up
Else
ENEMDIR=MDOWN : Rem if bike is below, turn down
End If
End If
Next COUNT
Ink ENEMYTRAIL : Bar ENEMX-2,ENEMY-2 To ENEMX+2,ENEMY+2
If ENEMDIR=MUP
ENEMY=ENEMY-2
End If
If ENEMDIR=MDOWN
ENEMY=ENEMY+2
End If
If ENEMDIR=MLEFT
ENEMX=ENEMX-2
End If
Else If ENEMDIR=MRIGHT : Rem right
For COUNT=4 To 8 Step 2
LEFTEDGE=ENEMY-2 : RIGHTEDGE=ENEMY+2 : RIGHTTOP=ENEMX-4 : LEFTTOP=ENEMX-4
Rem check ahead
CP=Point(ENEMX+COUNT,LEFTEDGE)
If CP<>BKCOLOR
PATHFOR=False
End If
CP=Point(ENEMX+COUNT,RIGHTEDGE)
If CP<>BKCOLOR
PATHFOR=False
End If
CP=Point(ENEMX,RIGHTEDGE+COUNT)
Rem check right
If CP<>BKCOLOR
PATHRIGHT=False
End If
CP=Point(RIGHTTOP,RIGHTEDGE+COUNT)
If CP<>BKCOLOR
PATHRIGHT=False
End If
CP=Point(ENEMX,LEFTEDGE-COUNT)
Rem check left
If CP<>BKCOLOR
PATHLEF=False
End If
CP=Point(LEFTTOP,LEFTEDGE-COUNT)
If CP<>BKCOLOR
PATHLEF=False
End If
Rem where can bike go?
If PATHFOR=False and PATHLEF=False and PATHRIGHT=False
Proc DIE[ENEMX,ENEMY] : ENEMLIVE=1 : Pop Proc
Else If PATHFOR=True and PATHLEF=True and PATHRIGHT=True : Rem clear
ENEMDIR=MRIGHT : Rem go right
Else If PATHLEF=False and PATHRIGHT=False
ENEMDIR=MRIGHT : Rem go right
Else If PATHLEF=False and PATHFOR=False
ENEMDIR=MDOWN : Rem turn down
Else If PATHFOR=False and PATHRIGHT=False
ENEMDIR=MUP : Rem turn up
Else If PATHFOR=False
If BIKEY<ENEMY
ENEMDIR=MUP : Rem if bike is above, turn up
Else
ENEMDIR=MDOWN : Rem turn down if bike is below
End If
End If
Next COUNT
Ink ENEMYTRAIL : Bar ENEMX-2,ENEMY-2 To ENEMX+2,ENEMY+2
If ENEMDIR=MUP
ENEMY=ENEMY-2
End If
If ENEMDIR=MDOWN
ENEMY=ENEMY+2
End If
If ENEMDIR=MRIGHT
ENEMX=ENEMX+2
End If
End If
End Proc
Procedure DESTRUCT[X,Y]
Sam Bank 5
Sam Play 2
Bob 0,X,Y,3
Wait 5
Bob 0,X,Y,4
Wait 5
Bob 0,X,Y,5
Wait 5
Bob 0,X,Y,6
Wait 5
Bob 0,X,Y,7
Wait 5
Bob 0,X,Y,8
Wait 5
Bob 0,X,Y,9
Wait 5
Bob 0,X,Y,10
Wait 5
Bob 0,X,Y,11
Wait 5
Bob 0,X,Y,12
Wait 5
Bob Off 0
End Proc
Procedure DIE[ENEMX,ENEMY]
Ink 5
Paint ENEMX,ENEMY,1
DESTRUCT[ENEMX-4,ENEMY-4]
SCORE(CURRENTPLAYER)=SCORE(CURRENTPLAYER)+500
If SCORE(CURRENTPLAYER)>HISCORE
HISCORE=SCORE(CURRENTPLAYER)
End If
End Proc
Procedure YOUDIE
Open Out 1,"ram:hiscore"
Print #1,HISCORE
Close 1
BIKEALIVE=False
PLIFE(CURRENTPLAYER)=PLIFE(CURRENTPLAYER)-1 : Rem remove one life, and associated bob
Bob Off PLIFE(CURRENTPLAYER)
End Proc
VARDEF:
Rem define our variables
Rem BIKEX,BIKEY = bike co-ordinates
Rem THICK = how frequently to plot light trail
Rem bikedir = direction of bike
Global BIKEX,BIKEY,BIKEDIR,THICK
Rem biketrail, enemytrail = colors of light cycles
Global BIKETRAIL,ENEMYTRAIL
Rem PATHFOR,PATHLEF,PATHRIGHT indicate if enemy can take a path forward,
Rem left, or right relative to its direction (boolean)
Global PATHFOR,PATHLEF,PATHRIGHT
Rem Elive1->3 = # of bikes
Global ELIVE1,ELIVE2,ELIVE3
Rem MDOWN,MLEFT,MRIGHT,MUP direction enemy is moving on screen
Global MDOWN,MLEFT,MRIGHT,MUP
Rem BKCOLOR = arena background color
Global BKCOLOR
Rem scupdate = (boolean) update high score
Global HISCORE,SCUPDATE
Rem BIKEWAIT, wait 5 steps before changing directions
Rem BIKECHANGE, test for change of direction
Global BIKEWAIT,BIKECHANGE,BIKEALIVE
Global CURRENTPLAYER,TWOMODE,SCORE(),LEVEL(),PLIFE()
Global LAMER()
SCUPDATE=False : LEVEL(2)=1 : PLIFE(2)=3 : LEVEL(6)=1
If TWOMODE=True : Rem if two players, give player two 3 lives, or ignore
PLIFE(6)=3
Else PLIFE(6)=0
End If
CURRENTPLAYER=2
Return
VARINIT:
DEBUG=True
MUP=1 : MLEFT=2 : MDOWN=3 : MRIGHT=4
BIKEX=200 : BIKEY=340 : BIKEALIVE=True : THICK=1
BKCOLOR=5
BIKEDIR=MUP : BIKECHANGE=False
Rem enem(num)x,enem(num)y,enem(num)dir =x,y & directions of enemy bikes
ENEM1X=200 : ENEM1Y=50 : ENEM1DIR=MDOWN : E1LIVE=0
ENEM2X=300 : ENEM2Y=50 : ENEM2DIR=MDOWN : E2LIVE=0
ENEM3X=100 : ENEM3Y=50 : ENEM3DIR=MDOWN : E3LIVE=0
BIKETRAIL=CURRENTPLAYER : ENEMYTRAIL=4
Return
OLDHISCORE:
FCHEK=Exist("Ram:hiscore")
If FCHEK=-1
Open In 1,"ram:hiscore"
Input #1,HISCORE
Close 1
Else
Open Out 1,"Ram:hiscore"
Print #1,HISCORE
Close 1
End If
Return
PICSEQ:
Screen Open 0,640,400,16,Hires+Laced
Hide
Unpack 15 To 0
Sam Bank 5
Sam Loop On
Sam Play 3
Wait Key
Sam Loop Off
Erase 0
Return
TITLESEQ:
Unpack 9 To 0
Wait 10
Sam Play 1
Wait 160
Wait Key
Do : Rem wait for 1/2 player input
If Key State(80)=True : Rem pressed F1
TWOMODE=False : LAMER(2)=True
Exit
Else If Key State(81)=True : Rem pressed F2
TWOMODE=False : LAMER(2)=False
Exit
Else If Key State(82)=True : Rem pressed F3
TWOMODE=True : LAMER(2)=True : LAMER(6)=True
Exit
Else If Key State(83)=True : Rem pressed F4
TWOMODE=True : LAMER(2)=False : LAMER(6)=False
Exit
Else If Key State(84)=True : Rem pressed F5
TWOMODE=True : LAMER(2)=True : LAMER(6)=False
Exit
Else If Key State(85)=True : Rem pressed F6
TWOMODE=True : LAMER(2)=False : LAMER(6)=True
Exit
End If
Loop
Erase 0
Return
INITSCREEN:
Unpack 10 To 0
Wait 57
Flash 3,"(000,10)(330,10)(660,10)(990,10)(cc0,10)(ff0,10)(cc0,10)(990,10)(660,10)(330,10)(000,10)"
Paper 12
Locate 62,11 : Print "LEVEL: ";LEVEL(2)
Locate 62,10 : Print "SCORE: ";SCORE(2)
Locate 62,17 : Print "LEVEL: ";LEVEL(6)
Locate 62,16 : Print "SCORE: ";SCORE(6)
Locate 62,24 : Print "HIGH: ";HISCORE
If CURRENTPLAYER=2 : Rem select colour of bases
IMAGE=2
Else
IMAGE=1
End If
For T=1 To PLIFE(CURRENTPLAYER) : Rem placing bases (# of lives)
Bob T,454+(T*16),35,IMAGE
Next T : Rem end of placing bases
Open In 1,"ram:hiscore" :
Rem load hiscore
Input #1,HISCORE
Close 1
Rem set up noises and make cycles Appear
' after playing each sample, wait 1.5 seconds
Sam Bank 11
Sam Play 1
Ink BIKETRAIL : Bar BIKEX-2,BIKEY-2 To BIKEX+2,BIKEY+2
Wait 95
Sam Play 1
Ink ENEMYTRAIL
Bar ENEM1X-2,ENEM1Y-2 To ENEM1X+2,ENEM1Y+2
Wait 60
If LEVEL(CURRENTPLAYER)>1
Bar ENEM2X-2,ENEM2Y-2 To ENEM2X+2,ENEM2Y+2
Sam Play 1
Wait 60
End If
If LEVEL(CURRENTPLAYER)>2
Bar ENEM3X-2,ENEM3Y-2 To ENEM3X+2,ENEM3Y+2
Sam Play 1
Wait 60
End If
If LEVEL(CURRENTPLAYER)=1
' play "we have transport", wait 1.5 seconds to start game
Sam Play 2
Wait 90
End If
Return
AGAINPLAY: Rem play again sequence
Paper 0 : Pen 3
Locate 58,47 : GOAGAIN$=" " : Input "Play again(y/n)?: ";GOAGAIN$
If GOAGAIN$="N" or GOAGAIN$="n"
CLEANUP: End
Else
SCORE(2)=0 : LEVEL(2)=1 : PLIFE(2)=3 : Rem reset scores,lives, and level
If TWOMODE=True
SCORE(6)=0 : LEVEL(6)=1 : PLIFE(6)=3 : CURRENTPLAYER=2
Else
PLIFE(6)=0 : SCORE(6)=0 : LEVEL(6)=1 : Rem set player 6 lives to 0
' for one player mode (explained in code sequence to check # of lives)
End If
End If
Return
BONUS:
If SCORE(CURRENTPLAYER) mod 1000=0
PLIFE(CURRENTPLAYER)=PLIFE(CURRENTPLAYER)+1
For T=1 To PLIFE(CURRENTPLAYER)
Bob T,454+(T*16),35,IMAGE
Next T : Rem end of placing bases
End If
Return
Procedure CLEANUP
Erase All
Kill "ram:hiscore"
End
End Proc